import request from '@/utils/request'

// 查询案卷列表
export function list(query) {
  return request({
    url: '/archives/archives/list',
    method: 'get',
    params: query
  })
}

// 查询案卷详细
export function get(archivesId) {
  return request({
    url: '/archives/archives/' + archivesId,
    method: 'get'
  })
}

// 新增案卷
export function add(data) {
  return request({
    url: '/archives/archives',
    method: 'post',
    data: data
  })
}

// 修改案卷
export function update(data) {
  return request({
    url: '/archives/archives',
    method: 'put',
    data: data
  })
}

// 删除案卷
export function del(archivesId) {
  return request({
    url: '/archives/archives/' + archivesId,
    method: 'delete'
  })
}

// 删除案卷
export function downloadPdf(archivesId) {
  return request({
    url: `/archives/archives/downloadPDF/${archivesId}`,
    method: 'GET'
  })
}

